On Windows 10 (Version 1803 and later with all updates applied) and Windows 11, the WebView2 runtime is distributed as part of the operating system.
Tauri 需要 WebView2 才能在 Windows 上呈現(xiàn)網(wǎng)頁內(nèi)容,所以您必須先安裝 WebView2。 最簡(jiǎn)單的方法是從微軟網(wǎng)站下載和運(yùn)行常青版引導(dǎo)程序。
安裝腳本會(huì)自動(dòng)為您下載適合您架構(gòu)的版本。 不過,如果您遇到問題 (特別是 Windows on ARM),您可以自己手動(dòng)選擇正確版本。
3. Rust?
最后,請(qǐng)前往 https://www.rust-lang.org/zh-CN/tools/install 來安裝 ?rustup? (Rust 安裝程序)。 請(qǐng)注意,為了使更改生效,您必須重新啟動(dòng)終端,在某些情況下需要重新啟動(dòng) Windows 本身。
或者,您可以在 PowerShell 中使用 ?winget? 命令安裝程序:
winget install --id Rustlang.Rustup
MSVC TOOLCHAIN AS DEFAULT For full support for Tauri and tools like trunk make sure the MSVC Rust toolchain is the selected default host triple in the installer dialog. Depending on your system it should be either x86_64-pc-windows-msvc, i686-pc-windows-msvc, or aarch64-pc-windows-msvc. If you already have Rust installed, you can make sure the correct toolchain is installed by running this command
sudo zypper up
sudo zypper in webkit2gtk3-soup2-devel \
libopenssl-devel \
curl \
wget \
libappindicator3-1 \
librsvg-devel
sudo zypper in -t pattern devel_basis
NixOS
Working on NixOS requires a slightly different setup, as Tauri needs to find the required system libraries both at compile time and dynamically at runtime. 為了 Tauri 正常運(yùn)作,環(huán)境變量 LD_LIBRARY_PATH 必須用正確的路徑填充。
When using [Nix Flakes], copy the following code into flake.nix on your repository, then run nix develop to activate the development environment. You can also use [direnv's Flakes integration] to automatically start the dev shell when entering the project folder.
If you don't use Nix Flakes, the [Nix Shell] can be configured using the following shell.nix script. Run nix-shell to activate the development environment, or use [direnv's Shell integration] to automatically start the dev shell when entering the project folder.let
To create Tauri development environments using [Guix shell], copy the following code into manifest.scm on your repository, then run guix shell to activate. You can also use [direnv's Guix shell support] to automatically start the Guix shell when entering the project folder.
(specifications->manifest
(list "gtk+@3"
"webkitgtk-with-libsoup2"
"libsoup-minimal@2"
"cairo"
"gdk-pixbuf"
"glib"
"dbus"
"openssl@3"
"gcc:lib"
"curl"
"wget"
"pkg-config"
"gsettings-desktop-schemas"))
更多建議: